/*
 * Ext Gantt 1.2
 * Copyright(c) 2009-2011 Mats Bryntse Consulting
 * mats@ext-scheduler.com
 * http://www.ext-scheduler.com/license.html
 *
 */
 
Ext.ns('Sch.gantt');

Sch.gantt.ViewPresets = {
    weekAndDayLetter : {
        timeColumnWidth : 140,
        displayDateFormat : 'Y-m-d',
        shiftUnit : "WEEK",
        shiftIncrement : 1,
        defaultSpan : 10,       // By default, show 10 weeks
        timeResolution : {
            unit : "DAY",
            increment : 1
        },
        headerConfig : {
             bottom : {
                unit : "WEEK",
                increment : 1,
                renderer : Sch.util.headerRenderers.dayLetter
            },
            middle : {
                unit : "WEEK",
                dateFormat : 'D d M Y',
                align : 'left'
            }
        }
    },
    weekDateAndMonth : {
        timeColumnWidth : 30,
        displayDateFormat : 'Y-m-d',
        shiftUnit : "WEEK",
        shiftIncrement : 1,
        defaultSpan : 10,       // By default, show 10 weeks
        timeResolution : {
            unit : "DAY",
            increment : 1
        },
        headerConfig : {
             middle : {
                unit : "WEEK",
                dateFormat : 'd'
            },
            top : {
                unit : "MONTH",
                dateFormat : 'Y F',
                align : 'left'
            }
        }
    }
};

// Register all the basic presets with the Preset Manager
(function() {
    var pm = Sch.PresetManager,
        vp = Sch.gantt.ViewPresets;

    for (var p in vp) {
        if (vp.hasOwnProperty(p)) {
            pm.registerPreset(p, vp[p]);
        }
    }
})();